#ifndef PLAYINGINFOVIEWER_H
#define PLAYINGINFOVIEWER_H

#include <QWidget>
#include <QTimer>
#include "../DataStructure/Enums.h"

class DotController;
class QLabel;

class PlayingInfoViewer : public QWidget
{
Q_OBJECT
public:
    explicit PlayingInfoViewer(DotController *pController, QWidget *parent = 0);

protected:
    void paintEvent(QPaintEvent *pEvent);

signals:

public slots:
    void updatePlayerInfo();
    void gameStarted();
    void playerNameChanged(Game::Player player);
    void playerColorChanged(Game::Player player);
    void lineAdded(Game::Player owner);
    void cellOwned(Game::Player owner);
    void gameFinished(Game::Player winner);
    void gameTurnChanged(Game::Player player);
    void gameCancelled();
    void blink();

private:
    void updateLblPalatte();
    void updateLblTxt();
    void showLbls(bool bShow);

private:
    DotController *mpController;
    QLabel *mpLblPlayer1,*mpLblPlayer2;
    QTimer mBlinkTimer;
};

#endif // PLAYINGINFOVIEWER_H
